<?php
header("content-type:text/html;charset=utf-8");
class Car {
	private $carMode;
	private $carBand;
	private $weight;
	private $speed;
	function Car($M,$B,$W,$S){
		$this->carMode = $M;
		$this->carBand = $B;
		$this->weight  = $W;
		$this->speed   = $S;
	}
	function getWeight(){
		return $this->weight;
	}
	function getSpeed(){
		return $this->speed;
	}
}
$Car1 = new Car("捷达","大众",1.5,160);
echo "<pre>";
print_r($Car1);
echo $Car1->getSpeed();
class BMWCar extends Car{}
$bmw1 = new BMWCar("宝马","大众",2,200);
echo "<pre>";
print_r($bmw1);
echo $bmw1->getweight();
//die;
/*echo $Car1->weight;
echo "<br/>";
echo $Car1->getWeight();
echo "<br/>";
echo $Car1->speed;
echo $Car1->getSpeed();
*/
class people {
	//public $hair;
	//public $eye;
	//public $body;
	private $hair;
	private $eye;
	private $body;
	function people($Hair,$Eye,$Body){
		$this->hair = $Hair;
		$this->eye  = $Eye;
		$this->body = $Body;
	}
	function getBody(){
		return $this->body;
	}
	function getEye(){
		return $this->eye;
	}
}
$Chinese = new people("black","black","thin");
echo "<pre>";
print_r($Chinese);
echo $Chinese->getBody();
/*$Chinese->hari = "black";
$Chinese->eye = "black";
$Chinese->body = "thin";
echo "<br/>";
echo $Chinese->getBody();
echo "<br/>";
echo $Chinese->eye;
echo "<br/>";
echo $Chinese->getEye();
*/






?>